package com.oversea.models;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "useraction")
@org.hibernate.annotations.Entity(dynamicUpdate = true)
public class UserAction extends BaseModel {
	private static final long serialVersionUID = -5404056504167584942L;

	private User user;
	private String loginIp; // 登录IP
	private String serarchKeyWords; // 搜索关键字
	private Date loginTime; // 登录时间
	private Date logoutTime; // 登出时间

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getLoginIp() {
		return loginIp;
	}

	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}

	public String getSerarchKeyWords() {
		return serarchKeyWords;
	}

	public void setSerarchKeyWords(String serarchKeyWords) {
		this.serarchKeyWords = serarchKeyWords;
	}

	public Date getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}

	public Date getLogoutTime() {
		return logoutTime;
	}

	public void setLogoutTime(Date logoutTime) {
		this.logoutTime = logoutTime;
	}

}
